﻿using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using SubSystem.Models;

namespace SubSystem.Helpers
{
    public static class HtmlArticle
    {
        public static string Article(this HtmlHelper html, IArticle article)
        {
            var tags = article.Tags;
            var tagsString = string.Join(", ", tags.ToArray());
            return string.Format("<div class=\"Article\">{0}<div class=\"Tags\">{1}</div></div>", article.Content, tagsString);
        }
    }
}
